package ncorps.fourier;

import ncorps.commun.ConditionInitiale;
import edu.emory.mathcs.jtransforms.fft.DoubleFFT_2D;

public class Dfft {

    public static double[][] dfft2d(double[][] grille) {
        DoubleFFT_2D FFT = new DoubleFFT_2D(ConditionInitiale._XDimG, ConditionInitiale._XDimG);
        FFT.realForward(grille);
        return grille;
    }

    public static double[][] idfft2d(double[][] grille) {
        DoubleFFT_2D fft = new DoubleFFT_2D(ConditionInitiale._XDimG, ConditionInitiale._XDimG);
        fft.realInverse(grille, true);
        return grille;
    }
}